<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	include(ROOTPATH .'include'. DS .'checkUserLogin.php');	
	$powder_min = 5 ;
	include(ROOTPATH .'include'. DS .'checkPowder.php');
	include "header.php";
	
	include(ROOTPATH .'class'. DS .'honor.class.php');
	$honor = new honor ;
	
	$task_id_code = getQuery('task_id');
	$task_id = getId('task_id');
	
	$file_id_code = getQuery('file_id');
	$file_id = getId('file_id');
	
	$sql = 'SELECT * FROM `'.DB_PRE.'task` WHERE `id` = '. $task_id ;
	$show = $dbs -> select($sql);
	$show = $show[0];
	
	$sql = 'SELECT * FROM `'.DB_PRE.'file` WHERE `id` = '. $file_id ;
	$file = $dbs -> select($sql);
	$file = $file[0];
	
	$userInfo = $user -> getUser($file['user_id']);

	
	
?>
<script type="text/javascript" src="<?php echo JS_PATH;?>honorAdd.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH;?>honor.js"></script>
<link href="<?php echo THEME_PATH ;?>css/admin.css" type="text/css" rel="stylesheet" media="all" />
</head>
<body>	
<div class="contents">  
	<h2 class="title"><?php echo $navigation -> getTitle();?></h2>
    <div id="honorAdd" class="honorAdd">
    <form action="<?php echo WEB_ROOT_PATH;?>?option=taskManageAction&type=action&do=addHonor&task_id=<?php echo $task_id_code;?>&file_id=<?php echo $file_id_code;?>" method="post" id="honorAddForm" class="form">
    <li><span>上传者:</span><?php echo $userInfo['nickName'] ;?></li>
    <li><span>已获荣誉:</span><?php
		echo $honor -> getFileList( $file_id );
	?></li>
    <li><span>荣誉名称:</span><input name="honor" id="honor" type="text" maxlength="30" /><i class="clew">例如: 芙蓉杯一等奖</i></li>
    <li><span>荣誉样式:</span><input name="cssClass" id="cssClass" type="text" maxlength="30" /><i class="clew">例如: lotusPrize</i></li>
    <hr />
    <div class="info"></div>
    <li><input type="submit" value="<?php echo lang_submit;?>" class="submit" /></li>&nbsp;
    </form>
    </div><!-- .honorAdd-->
</div><!-- .contents-->

</body>
</html>
